package com.zl.common.enums.code;

import com.zl.common.enums.code.IDictEnum;

/**
 * 
 * @author zhouliang
 *
 */
public class GlobalDictEnum {
    
    /** 数据状态*/
    public enum DATA_STATUS implements IDictEnum{
        /**启用*/
        ENABLE("00", "正常"),
        /**禁用*/
        DISABLE("01", "停用"),
        /**临时*/
        TEMPORARY("98", "临时"),
        /**删除*/
        DELETE("99", "删除"),
        ;
        private String code;
        private String msg;

        DATA_STATUS(String code, String msg) {
            this.code = code;
            this.msg = msg;
        }
        @Override
        public String getCode() {
            return code;
        }
        @Override
        public String getMsg() {
            return msg;
        }
        public static String msg(String code) {
            for (DATA_STATUS m : DATA_STATUS.values()) {
                if (m.getCode().equalsIgnoreCase(code)) {
                    return m.getMsg();
                }
            }
            return null;
        }
    }
}
